package com.chinamsp.dydb.dbsource;

import com.chinamsp.dydb.dbsource.policy.DynamicDataSourcePolicy;
import com.chinamsp.dydb.dbsource.policy.RandomPolicyImpl;

/**
 * 动态数据源的 policy 定义
 * @author shifenghu
 *
 */
public enum DynamicDataSourcePolicyType {
	/**
	 * 随机实现
	 */
    RANDOM (new RandomPolicyImpl());
   
	
	private DynamicDataSourcePolicy policy;
	
	private DynamicDataSourcePolicyType(DynamicDataSourcePolicy policy) {
		this.policy = policy;
	}
	
	
	public DynamicDataSourcePolicy policy() {
		return policy;
	}
}
